package cn.webestar.scms.security;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.io.Serializable;

@Data
@ConfigurationProperties("scms.security")
public class SecurityProperties implements Serializable {

    /**
     * 是否开启安全控制
     */
    private Boolean enable = true;

    /**
     * 缓存前缀
     */
    private String cachePrefix = "app";

    /**
     * 访问令牌有效期，单位秒
     */
    private Integer accessTokenExpireIn = 60 * 60 * 5;

    /**
     * 是否开启图片验证码
     */
    private Boolean enableImageCaptcha = true;

    /**
     * 安全拦截路径
     */
    private String[] urlPatterns = new String[]{"/*"};

    /**
     * api数据加密方式,NONE、RSA
     */
    private String encryptType = "NONE";

    /**
     * api数据解密私钥
     */
    private String privateKey;

}
